The file titled US Electricity.csv includes a time series index compiled by the US Federal Reserve representing total fossil-fuel US electricity generation by all utilities from January 1939 through October 2021.
In the following code box we read the CSV file and set up the data as a tsibble and then we plot it and subset it to examine it.
We are interested in developing a two-year long monthly forecast (24 months) for the national electricity production requirements.
## Series: ELEC
## Model: ARIMA(0,1,0)(2,1,0)[12]
##
## Coefficients:
## sar1 sar2
## -0.3561 -0.3160
## s.e. 0.0906 0.0893
##
## sigma^2 estimated as 15.61: log likelihood=-358.21
## AIC=722.42 AICc=722.61 BIC=730.97
## Series: ELEC
## Model: ARIMA(0,0,1)(2,1,1)[12]
##
## Coefficients:
## ma1 sar1 sar2 sma1
## 0.3538 0.1687 -0.3520 -0.8514
## s.e. 0.0758 0.1306 0.1126 0.2248
##
## sigma^2 estimated as 8.5: log likelihood=-329.61
## AIC=669.22 AICc=669.71 BIC=683.52
## Series: ELEC
## Model: ARIMA(3,1,0)(2,1,0)[12]
##
## Coefficients:
## ar1 ar2 ar3 sar1 sar2
## -0.4892 -0.3676 -0.1726 -0.3371 -0.4363
## s.e. 0.0901 0.0982 0.0902 0.0869 0.0874
##
## sigma^2 estimated as 12.52: log likelihood=-343.88
## AIC=699.75 AICc=700.44 BIC=716.86
## Series: ELEC
## Model: ARIMA(1,0,0)(2,1,0)[12]
##
## Coefficients:
## ar1 sar1 sar2
## 0.3757 -0.3375 -0.4386
## s.e. 0.0877 0.0834 0.0870
##
## sigma^2 estimated as 10.76: log likelihood=-337.76
## AIC=683.53 AICc=683.85 BIC=694.97
## Series: ELEC
## Model: ETS(M,N,A)
## Smoothing parameters:
## alpha = 0.2924178
## gamma = 0.0001000089
##
## Initial states:
## l[0] s[0] s[-1] s[-2] s[-3] s[-4] s[-5] s[-6]
## 101.0318 7.817185 -6.612555 -11.00125 -2.759789 8.873747 10.47588 -0.3751617
## s[-7] s[-8] s[-9] s[-10] s[-11]
## -11.78396 -13.88839 -2.460821 6.012828 15.70228
##
## sigma^2: 9e-04
##
## AIC AICc BIC
## 1019.152 1022.992 1063.383
Fit cross-validation models for each of the time sub-series in the stretched data for each of the four model types selected in (4). In the case(s) where the models were automatically selected, do NOT run the automatic selection under cross validation, instead enter manually the model order/type when you call the ARIMA()/ETS() function.
Prepare a 24-month ahead forecast for each of the models fitted in (5) and prepare a plot of MAPE vs months-ahead. Based on the dynamic behavior of cross-validation MAPE discuss which model(s) should be kept/discarded.
For the best model in (6) plot the 24-month ahead forecast and plot the forecast and the corresponding confidence interval to help you address the service level question. Report numerically the month-by-month the index forecasts that meet the desired 95% service level.